package com.fifth.apartment.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Set;

/**
 * TODO
 *
 * @author Dao
 * @since 2024/7/2
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户表")
public class User {

    private Integer id;
    private String username;
    private String password;
    private String token;
    private String state;
    private String name;
    private String phone;
    private Integer power;
    @TableField("is_delete")
    private Integer isDelete;
    private Integer version;

    @TableField(exist = false)
    private Set<Role> roles;

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }
}
